package com.iwop.moto.service.impl;

import com.iwop.moto.model.SuperRecordModel;
import com.iwop.moto.model.User;
import com.iwop.moto.service.BaseService;
import com.iwop.moto.service.YunxinService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by mobom on 2016/10/27.
 */
@Service
public class YunxinServiceImpl extends BaseService implements YunxinService {
    @Override
    public void insertIM(SuperRecordModel SRModel) {
        getSqlSession().insert("FYunxinMapper.insert",SRModel);
    }

    @Override
    public void updateIMUser(SuperRecordModel SRModel) {
        getSqlSession().insert("FYunxinMapper.update",SRModel);
    }

    @Override
    public SuperRecordModel getIMUserInfo(String sid) {
        return getSqlSession().selectOne("FYunxinMapper.getIMUserInfo",sid);
    }

    @Override
    public List<SuperRecordModel> getAllIMUser() {
        return getSqlSession().selectList("FYunxinMapper.getAllIMUser");
    }
}
